Xbasic

*RTF_TO_BIN Function

Syntax

RTF_Binary_Text as B = *RTF_TO_BIN(C text)

Arguments

RTF_Binary_Text

Binary formatted RTF text as it exists in a RTF memo field.

text

ASCII encoded RTF text.

Description

Convert from rtf to binary.

Discussion

The *RTF_TO_BIN() function converts ASCII encoded RTF text to the binary format stored in RTF memo fields.

Example

? *rtf_to_bin("{\rtf1\ansi \deff0{\colortbl;\red0\green0\blue0;}{\fonttbl{\f0\fswiss Arial;}}{{\f0 \cf1 \fs16 Alpha!}}}")
= 0000 : 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00
0010 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0020 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0030 : 00 00 00 00 00 00 ff ff 00 00 02 00 00 00 00 00
0040 : 00 00 00 00 00 00 00 00 00 00 60 ff ff ff 00 00

See Also